package me.jessyan.armscomponent.app.mvp.ui.adapter;

import android.view.View;

import com.jess.arms.base.BaseHolder;
import com.jess.arms.base.DefaultAdapter;

import java.util.List;

import me.jessyan.armscomponent.app.R;
import me.jessyan.armscomponent.app.mvp.model.entity.Question;
import me.jessyan.armscomponent.app.mvp.ui.holder.ChoiceQuestionAnswerItemHolder;

/**
 * Desc:
 * Created by taoze
 * on 2021/10/20
 **/
public class UserTestLevelAnswerAdapter extends DefaultAdapter<Question.Option> {

    private Question question;

    public UserTestLevelAnswerAdapter(Question question, List<Question.Option> infos) {
        super(infos);
        this.question = question;
    }

    @Override
    public BaseHolder<Question.Option> getHolder(View v, int viewType) {
        return new ChoiceQuestionAnswerItemHolder(v, question);
    }

    @Override
    public int getLayoutId(int viewType) {
        return R.layout.adapter_user_question_choice_answer;
    }
}
